/*
  Created by 1271107612@qq.com.
  User: DELL
  Date: 2022/4/12
  Time: 10:15
  DESCRIPTION: 
*/
package com.zzy.face.controller;
import com.zzy.face.dto.PwdChangeDto;
import com.zzy.face.dto.StudentInfo;
import com.zzy.face.dto.TeacherInfo;
import com.zzy.face.model.Account;
import com.zzy.face.service.AccountService;
import com.zzy.face.service.StudentService;
import com.zzy.face.service.TeacherService;
import com.zzy.face.utils.Result;
import com.zzy.face.utils.ResultCode;
import com.zzy.face.utils.jwt.Jwt;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.codec.digest.DigestUtils;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

@RestController
@RequestMapping("/admin")
public class AdminController {
    final TeacherService teacherService;
    final AccountService accountService;
    final StudentService studentService;
    final com.zzy.face.utils.jwt.Jwt jwt;
    public AdminController(TeacherService teacherService, AccountService accountService, StudentService studentService, Jwt jwt) {
        this.teacherService = teacherService;
        this.accountService = accountService;
        this.studentService = studentService;
        this.jwt = jwt;
    }

    @RequestMapping(value = "/teachers", method = RequestMethod.GET)
    @ApiOperation(value = "获取全部老师", notes = "获取全部老师")
    public Result teacherInfos() {
        List<TeacherInfo> teacherList = teacherService.findTeachersInfo();
        return new Result(ResultCode.SUCCESS,teacherList);
    }
}
